package cxt.cn.springcloud.controller;

import cxt.com.springcloud.pojo.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @Auther: ChengXiaotian
 * @Date: 2020-06-10 09:04
 * @Description:
 */
@RestController
public class orderControoller {
    private static final String URL="http://cloud-provider-paymentconsul8007";
    @Autowired
    private RestTemplate restTemplate;
    @GetMapping("/order")
    public CommonResult tpayment(){
        ResponseEntity<String> forEntity = restTemplate.getForEntity(URL + "/payment/zk/", String.class);
        return new CommonResult<>(200,"查询成功",forEntity);
    }
}
